package com.sunny.ynhz.adapter;

import android.graphics.Color;
import android.support.annotation.Nullable;
import android.widget.TextView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.sunny.ynhz.R;
import com.sunny.ynhz.bean.TimeBean;
import com.sunny.ynhz.utils.TimeUtils;

import java.util.Date;
import java.util.List;

/**
 * Created by huhuan123 on 2018/8/8.
 *
 * @describe TODO
 */

public class MonthAdapter extends BaseQuickAdapter<TimeBean, BaseViewHolder> {
    String month;
    String year;

    public MonthAdapter(@Nullable List<TimeBean> data, String month, String year) {
        super(R.layout.item_month_day, data);
        this.month = month;
        this.year = year;
    }

    @Override
    protected void convert(BaseViewHolder helper, TimeBean item) {
        TextView tv_time = helper.getView(R.id.tv_time);
        tv_time.setText(item.getTime());
        if (item.isCheck) {
            tv_time.setBackgroundColor(Color.parseColor("#dbdfff"));
            tv_time.setTextColor(Color.parseColor("#367be1"));
        } else {
            tv_time.setBackgroundColor(Color.parseColor("#ffffff"));
            tv_time.setTextColor(Color.parseColor("#666666"));
        }


    }
}
